<%--
  Created by IntelliJ IDEA.
  User: 86152
  Date: 2022/3/23
  Time: 15:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%@ include file="/WEB-INF/view/template.jsp" %>
<div class="page-wrapper">
    <div class="main-content">
        <!-- Page Title Start -->
        <div class="row">
            <div class="colxl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                <div class="page-title-wrapper">
                    <div class="page-title-box ad-title-box-use">
                        <h4 class="page-title">Orders</h4>
                    </div>
                    <div class="ad-breadcrumb">
                        <ul>
                            <li>
                                <div class="ad-user-btn">
                                    <input class="form-control" type="text" placeholder="Search Here..."
                                           id="text-input">
                                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 56.966 56.966">
                                        <path d="M55.146,51.887L41.588,37.786c3.486-4.144,5.396-9.358,5.396-14.786c0-12.682-10.318-23-23-23s-23,10.318-23,23
												s10.318,23,23,23c4.761,0,9.298-1.436,13.177-4.162l13.661,14.208c0.571,0.593,1.339,0.92,2.162,0.92
												c0.779,0,1.518-0.297,2.079-0.837C56.255,54.982,56.293,53.08,55.146,51.887z M23.984,6c9.374,0,17,7.626,17,17s-7.626,17-17,17
												s-17-7.626-17-17S14.61,6,23.984,6z"></path>
                                    </svg>
                                </div>
                            </li>
                            <li>
                                <div class="add-group">
                                    <a class="ad-btn">Add New Order</a>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!-- Table Start -->
        <div class="row">
            <!-- Styled Table Card-->
            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                <div class="card table-card">
                    <div class="card-header pb-0">
                        <h4>商品列表</h4>
                    </div>
                    <div class="card-body">
                        <div class="chart-holder">
                            <div class="table-responsive">
                                <table class="table table-styled mb-0">
                                    <thead>
                                    <tr>
                                        <th>
                                            <div class="checkbox">
                                                <input id="checkbox1" type="checkbox">
                                                <label for="checkbox1"></label>
                                            </div>
                                        </th>
                                        <th>商品名称</th>
                                        <th>商品描述</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach var="sell" items="${userOrderList}">
                                        <tr>
                                            <td>${sell.id}</td>
                                            <td>${sell.product.ptitle}</td>
                                            <td>${sell.product.pdesc}</td>
                                            <td>${sell.state}</td>
                                            <td><a href="api/user/del_sell/${sell.id}">下架</a>
                                                <a href="api/user/up_sell/${sell.id}">修改信息</a>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                    <label>${mess}</label>
                                </table>
                            </div>
                        </div>
                        <div class="text-right pt-2">
                            <nav class="d-inline-block">
                                <ul class="pagination mb-0 ">
                                    <input type="hidden" id="pageNum" value="${itemsList.getPageNum()}">
                                    <input type="hidden" id="totalPage" value="${itemsList.getPages()}">
                                    <span onclick="firstPage()">首页</span>
                                    <span onclick="prePage()">上一页</span>
                                    <span onclick="nextPage()">下一页</span>
                                    <span onclick="lastPage()">尾页</span>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
